import { request } from '@/framework/utils/request-jdz';

// 请求列表

export const getlistData = (params) => {
  return request(
    {
      url: 'strain/instance',
      method: 'get',
      params,
      timeout: 10 * 60 * 1000,
    },
    {
      isGetDataDirectly: false,
    },
  );
};

// 导入批量删除

export const deleteAlllistData = (params) => {
  return request(
    {
      url: `strain/instance/ids?ids=${params}`,
      method: 'delete',
    },
    {
      isGetDataDirectly: false,
    },
  );
};
// 导入删除

export const deletelistData = (id) => {
  return request(
    {
      url: `strain/instance/${id}`,
      method: 'delete',
    },
    {
      isGetDataDirectly: false,
    },
  );
};

// 查看
export const ampledetailed = (id) => {
  return request(
    {
      url: `/strain/instance/${id}`,
      method: 'get',
    },
    {
      isGetDataDirectly: false,
    },
  );
};
// 文件上传后的id绑定
export const postfile = (data) => {
  return request(
    {
      url: `strain/instance/attachment`,
      method: 'post',
      data,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
// {
//   id:1,
//   split_count	:5,
//   instanceEntityList:[
//     {split_unit:ml,
//     split_capacity:100
//     }
//   ]
// }
